//加载公共样式
require('../../assets/css/index.less')


let dom = require('../../utils/dom')
const request = require('../../utils/request')

//字体图标
require('../../assets/fonts/iconfont.css')
//加载自己的样式
require('./circle.less')


window.onload = () => {
    //底部
    dom.Bmenu('circle')
    let CircleContent = document.querySelector('#CircleContent')
    
    function getCircleList() {
        request.get('/api/circles/opinionList').then(res => {
            console.log(res);
            let { errno, data } = res.data
            if (errno == 0) {
                data.map(v => {
                    console.log(v);
                    CircleContent.innerHTML +=
                    `
                        <div class="infor df">
                        <img src="../../assets/imgs/yuan.jpg" alt="">
                        <div class="username">
                            <p class="font16" style="margin-bottom:5px;">${v.id}</p>
                            <p class="font12">成都市,金牛区</p>
                        </div>
                        </div>
                        <p class="words font14">
                            ${v.content}
                        </p>
                        <div class="photos df">
                            <img src="${v.imgUrls}" alt="">
                        </div>
                    `
                })
            }
        })
    }
    getCircleList()
}